<%@ page import="com.zgr.ssh.entity.Plant" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form>
        <table border="1" cellspacing="0" cellpadding="0" width="400px" align="center">
            <tr>
                <td>id</td><td>批次号</td><td>品种</td><td>rfid</td><td>状态</td><td>操作</td>
            </tr>
            <%
                List<Plant> list = (List<Plant>) session.getAttribute("list");
                for (Plant plant : list) {
            %>
            <tr>
                <td><%=plant.getId()%></td><td> <%=plant.getBatchId()%> </td>
                <td><%=plant.getName()%></td>
                <td><%=plant.getRfid()%></td>
                <td><%=plant.getIsUp()==1?"在线":"离线"%></td>
                <td>
                    <% if(plant.getIsUp() == 0){%>
                    <a href="PlantAction_upLine?id=<%=plant.getId()%>">上线 </a>
                    <% } else{%>
                    <a href="PlantAction_downLine?id=<%= plant.getId()%>">下线 <a/>
                    <% } %>
                </td>
            </tr>
            <% } %>
        </table>
    </form>
</body>
</html>
